# -*- codeing = utf-8 -*-
# @Time : 2022/12/23 15:55
# @Author : 小马
# @File: tank.py
# @Software : PyCharm
import pygame
class tank(pygame.sprite.Sprite):
    def __init__(self):
        super(tank, self).__init__()
        self.image = pygame.image.load('material/character4.1.PNG').convert_alpha()
        self.images=[pygame.image.load('material/character4.{:d}.png'.format(i)).convert_alpha() for i in range(1,32)]
        self.rect=self.images[0].get_rect()
        self.blood=6
        # self.rect.top=220
        # self.rect.left=800


    def update(self,*args):
        if self.blood>0:
            self.image = self.images[args[0] % len(self.images)]

        else:
            self.kill()


